﻿using BCDto.WebSocketComponent;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text;

namespace BCWebSocket
{
    /// <summary>
    /// WebSocket工厂接口
    /// </summary>
    public interface IWebSocketFactory
    {
        /// <summary>
        /// 操作处理
        /// </summary>
        /// <param name="requestContent">请求内容</param>
        /// <returns></returns>
        WebSocketResponseDto OperationHandle(WebSocketRequestDto requestContent);
        /// <summary>
        /// 消息处理
        /// </summary>
        /// <param name="requestContent">请求内容</param>
        /// <returns></returns>
        WebSocketResponseDto ContentHandle(WebSocketRequestDto requestContent);
        /// <summary>
        /// 重新分配客服
        /// </summary>
        /// <param name="concurrentDictionary">WebSocket存储容器</param>
        /// <param name="adminId">管理员Id</param>
        void RedistributeCustom(ConcurrentDictionary<string, WebSocketUserDto> concurrentDictionary,string adminId);
        /// <summary>
        /// 接待用户下线
        /// </summary>
        /// <param name="concurrentDictionary">WebSocket存储容器</param>
        /// <param name="receptionUser">接待用户</param>
        void Offline(ConcurrentDictionary<string, WebSocketUserDto> concurrentDictionary, string receptionUser);
    }
}
